var mongoose = require('mongoose');

var settings = require('../settings');

var C_mongo;
if(process.env.OPENSHIFT_NODEJS_PORT){
	C_mongo = process.env.OPENSHIFT_MONGODB_DB_URL;
	console.log("db auth");
}else{
	C_mongo = 'mongodb://' 
	+ '127.0.0.1/'
	+ settings.db_name;

}

mongoose.connect(C_mongo);

